# Once done, this will define
#
#  OPENCV_INCLUDE_DIR - the OPENCV include directory
#  OPENCV_LIBRARY_DIR - the OPENCV library directory
#  OPENCV_LIBS - link these to use OPENCV
#
#  ......

MACRO(LOAD_OPENCV os arch)
    #MESSAGE(INFO "--------------------------------")
    #MESSAGE(STATUS "3RDPARTY_DIR: ${3RDPARTY_DIR}")
    #FIND_FILE(SPDLOG_INCLUDE_DIR include ${3RDPARTY_DIR} NO_DEFAULT_PATH)
    #FIND_FILE(SPDLOG_LIBRARY_DIR lib ${3RDPARTY_DIR} NO_DEFAULT_PATH)
    SET(OPENCV_INCLUDE_DIR ${SERVER_3RDPARTY_PATH}/opencv/include/opencv4)
    SET(OPENCV_LIBRARY_DIR ${SERVER_3RDPARTY_PATH}/opencv/lib)

    IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
        SET(OPENCV_LIBS opencv_imgcodecs opencv_calib3d 
        opencv_features2d opencv_imgproc opencv_flann opencv_core)
    ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
        SET(OPENCV_LIBS opencv_imgcodecs opencv_ml opencv_calib3d 
        opencv_features2d opencv_imgproc opencv_flann opencv_core)
    ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")
ENDMACRO()
